
ALTER PROC uspChiTietSinhVien
	@MaSV NVARCHAR(50) = null
AS
BEGIN

	-- Tim kiem
	SELECT MaSV, 
		TenSV, 
		Nganh, 
		NgaySinh, 
		CASE GioiTinh 
			WHEN 0 THEN N'Nam' 
			ELSE N'Nữ' 
			END 
		AS 'GioiTinh', 
		Lop, 
		KH.TenKhoaHoc AS 'KhoaHoc',
		HS.AnhChanDung
	FROM KhoaHoc AS KH WITH (NOLOCK)
	   JOIN HocSinh AS HS WITH (NOLOCK) ON HS.KhoaHoc = KH.ID 
	WHERE MaSV = @MaSV 
	
END
